﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace HCMS.Entities.OAuth2
{
    /// <summary>
    /// OAuth 2.0 RefreshToken
    /// </summary>
    [Table("OAuth2RefreshToken")]
    public class OAuth2RefreshToken : Entity<int>
    {
        /// <summary>
        /// 创建 时间
        /// </summary>
        [Column("CreateTime")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 应用 Id
        /// </summary>
        [Column("AppId")]
        public double AppId { get; set; }

        /// <summary>
        /// Token 值
        /// </summary>
        [Column("Token")]
        public string Token { get; set; } = "";

        /// <summary>
        /// 有效期
        /// </summary>
        /// <remarks>
        /// 例如：有效期：30天，这里就是30天对应的秒数
        /// </remarks>
        [Column("ExpiresIn")]
        public double ExpiresIn { get; set; }
    }
}
